x86: Restrict MSR access when the kernel is locked down
authorMatthew Garrett <matthew.garrett@nebula.com>
Wed, 5 Apr 2017 16:40:30 +0000 (17:40 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 1 Oct 2017 14:52:09 +0000 (15:52 +0100)
commit09cc4e42b14eda586062551ae0d9f27e372249b8
tree6b9c001327cbe2fe10547f4aaa3aace1085fe5ef
parent3a5b6e3cdded32240da5991d49c9ab8566b115f0
x86: Restrict MSR access when the kernel is locked down

Writing to MSRs should not be allowed if the kernel is locked down, since
it could lead to execution of arbitrary code in kernel mode.  Based on a
patch by Kees Cook.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0051-x86-Restrict-MSR-access-when-the-kernel-is-locked-do.patch
arch/x86/kernel/msr.c